# Maintainer: Bruno Pagani <archange@archlinux.org>

pkgname=webp-pixbuf-loader
pkgver=0.2.5
pkgrel=1
pkgdesc="WebM GDK Pixbuf Loader library"
arch=(loong64 x86_64)
url="https://github.com/aruiz/webp-pixbuf-loader"
license=(LGPL)
depends=(gdk-pixbuf2 libwebp)
makedepends=(meson)
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
        https://github.com/aruiz/webp-pixbuf-loader/commit/834657c8.patch)
sha256sums=('e1b76c538a1d3b3fc41323d044c7c84365ab9bd5ab3dcc8de7efb0c7dc2f206b'
            'e2663d431786ff336ceeabbdf466f7d25627445fcb8a003be61418675cf4b4bc')

prepare() {
  patch -d $pkgname-$pkgver -p1 < 834657c8.patch # Fix libwebp dependency
}

build() {
  arch-meson ${pkgname}-${pkgver} build
  ninja -C build
}

package() {
  DESTDIR="${pkgdir}" ninja -C build install
}
